define( [
	'jquery',
	'require',
	'header',
	'message',
	'api',
	'bigwe_utils',
	'selector'
], function( $, require ) {

	$( '#submit' ).on( 'click', function() {
        var ShowTitleMessage = require('message');
		var status = $( '#status' ).val();
		var remarks = $.trim( $( '#remarks' ).val() );
		var id = $.trim( $( '#id' ).val() );

        $.ajax({
            type: "POST",
            dataType: 'json',
            url: "/account_verify/edit_account",
            data: {
                status :   status,
                remark :   remarks,
                id :   id
            },
            success:function(rdata){
                rdata = typeof rdata === 'string' ? $.parseJSON(rdata) : rdata;
                if(rdata.ret == 0){
                    alert('审核状态已改变');
                    history.go(-1);
                }
                else{
                    ShowTitleMessage.showWarning( rdata.msg, msg.showTime );
                }
            }
        });

	} );

} );
